package com.yanqu.road.server.cmd.activity.apprentice.cross;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ApprenticeProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.apprentice.ApprenticeModule;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_APPRENTICE_AFTER_LOGIN_FROM_CROSS,desc = "爱徒养成-跨服返回-登录后处理")
public class ApprenticeAfterLoginFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        ApprenticeProto.ApprenticeAfterLoginCrossRespMsg respMsg = ApprenticeProto.ApprenticeAfterLoginCrossRespMsg.parseFrom(packet.getBytes());
        //跨服返回-执行项目
        player.getModule(ApprenticeModule.class).afterLoginFromCross(respMsg);
    }

    @Override
    public void sendData(GamePlayer player) {}
}
